<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        *{
            padding: 0;
            margin: 0;
        }
        #wrap .inner:nth-of-type(1){
            border: 1px black dashed;
        }
        /* #wrap div:nth-of-type(1){
            border: 1px black dashed;
        }
        #wrap p:nth-of-type(1){
            border: 1px black dashed;
        }
        #wrap h1:nth-of-type(1){
            border: 1px black dashed;
        } */
    </style>
</head>
<body>
    <div id="wrap">
        <div class="outer">1</div>
        <div class="inner">1</div>
        <p class="inner">1</p>
        <h1 class="inner">1</h1>
        
    </div>
</body>
</html>